package com.ruoyi.supermarket.mapper;

import java.util.List;

import com.ruoyi.supermarket.annotation.AutoFill;
import com.ruoyi.supermarket.annotation.OperationType;
import com.ruoyi.supermarket.domain.Supply;
import org.apache.ibatis.annotations.Param;

/**
 * 供客Mapper接口
 * 
 * @author ruoyi
 * @date 2024-05-19
 */
public interface SupplyMapper 
{
    /**
     * 查询供客
     * 
     * @param supplyId 供客主键
     * @return 供客
     */
    public Supply selectSupplyBySupplyId(Long supplyId);

    /**
     * 查询供客列表
     * 
     * @param supply 供客
     * @return 供客集合
     */
    public List<Supply> selectSupplyList(Supply supply);

    /**
     * 新增供客
     * 
     * @param supply 供客
     * @return 结果
     */
    @AutoFill(OperationType.INSERT)
    public int insertSupply(Supply supply);

    /**
     * 修改供客
     * 
     * @param supply 供客
     * @return 结果
     */
    @AutoFill(OperationType.UPDATE)
    public int updateSupply(Supply supply);

    /**
     * 删除供客
     * 
     * @param supplyId 供客主键
     * @return 结果
     */
    public int deleteSupplyBySupplyId(Long supplyId);

    /**
     * 批量删除供客
     * 
     * @param supplyIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSupplyBySupplyIds(Long[] supplyIds);

    public Supply findSupplyByName(@Param("supplyName") String supplyName, @Param("isType")String isType);

    /**
     * 查询供应商、客户
     * @param
     * @return
     */
    List<Supply> selectGKSupplyList(Long type);

    List<Supply> selectSupplyListOne(Supply supply);
}
